package com.sample.api;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Request;
import javax.ws.rs.core.UriInfo;

import org.springframework.beans.factory.annotation.Autowired;

@Path("/api")
public class ApiServlet {

	private WebApi webApi;
	
	@Autowired
	public ApiServlet(WebApi webApi) {
		this.webApi = webApi;
	}
	  @Context
	  UriInfo uriInfo;
	  @Context
	  Request request;
	  
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	@Consumes(MediaType.APPLICATION_JSON)
	public void addImage() {
		
		webApi.addUser("pankaj", "pankajarora.nitk@gmail.com", "123456");
	}
	
}
